package com.spogher.bsc.panels;

import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.Panel;

import com.spogher.bsc.BscSession;
import com.spogher.bsc.pages.ChampionshipPage;
import com.spogher.bsc.pages.ManagePlayerPage;
import com.spogher.bsc.pages.ManageTeamPage;
import com.spogher.bsc.pages.PlayerPage;
import com.spogher.bsc.pages.ScoreSheetPage;
import com.spogher.bsc.pages.TeamPage;

public class AdminMenuPanel extends Panel{

	private static final long serialVersionUID = 1L;

	public AdminMenuPanel(String id) {
		super(id);
		createComponents();
	}

	private void createComponents() {
		add(new BookmarkablePageLink<Void>("championship", ChampionshipPage.class).setEnabled(BscSession.get().isRootUser()));
        add(new BookmarkablePageLink<Void>("team", TeamPage.class));
        add(new BookmarkablePageLink<Void>("player", PlayerPage.class));
        add(new BookmarkablePageLink<Void>("manageTeam", ManageTeamPage.class).setEnabled(BscSession.get().isRootUser()));
        add(new BookmarkablePageLink<Void>("managePlayer", ManagePlayerPage.class));
        add(new BookmarkablePageLink<Void>("scoreSheet", ScoreSheetPage.class));		
	}

}
